/*
 * 文 件 名 : ChatRecord.java
 * 版    权 : China Machi.Co.,Ltd.Copyright 2009-2011.All rights reserved
 * 描    述 : <描述>
 * 修 改 人 : lixg
 * 修改时间 : 2012-9-22
 * 跟踪单号 : <跟踪单号>
 * 修改单号 : <修改单号>
 * 修改内容 : <修改内容>
 */
package com.fire8.dolphin.model;

/**
 * 聊天记录
 * <功能详细描述>
 *
 * @author  lixg
 * @version [版本号,2012-9-22]
 * @see     [相关类/方法]
 * @since   [产品/模块]
 */
public class ChatRecord
{
    private Integer crId;
    private Integer userId;
    private String account;
    private String chatItem;
    private String itemType;//内容类型[文字、语音、图片]
    private String chatDate;
    private String itemIO;// in:from;out:to
    
    public static final String ITEM_IO_IN="in";
    public static final String ITEM_IO_OUT="out";
    //表名
    public static final String TABLE_NAME="t_chat_record";
    //列名
    public static final String C_CR_ID="crId";
    public static final String C_USER_ID="userId";
    public static final String C_ACCOUNT="account";
    public static final String C_CHAT_ITEM="chatItem";
    public static final String C_ITEM_TYPE="itemType";
    public static final String C_CHAT_DATE="chatDate";
    public static final String C_ITEM_IO="itemIO";
    
    public static final String ITEM_TYPE_TEXT="0";//文本
    public static final String ITEM_TYPE_VOICE="1";//语音
    public static final String CREATE_TABLE= new StringBuffer("CREATE TABLE ")
    .append(TABLE_NAME)
    .append("(")
    .append(C_CR_ID).append(" integer primary key autoincrement")//id
    .append(",").append(C_USER_ID).append(" integer ")//服务器上的ID
    .append(",").append(C_ACCOUNT)
    .append(",").append(C_CHAT_ITEM)
    .append(",").append(C_ITEM_TYPE)
    .append(",").append(C_CHAT_DATE)
    .append(",").append(C_ITEM_IO)
    .append(")")
    .toString();
    
    public Integer getCrId()
    {
        return crId;
    }
    public void setCrId(Integer crId)
    {
        this.crId = crId;
    }
    public Integer getUserId()
    {
        return userId;
    }
    public void setUserId(Integer userId)
    {
        this.userId = userId;
    }
    public String getChatItem()
    {
        return chatItem;
    }
    public void setChatItem(String chatItem)
    {
        this.chatItem = chatItem;
    }
    public String getItemType()
    {
        return itemType;
    }
    public void setItemType(String itemType)
    {
        this.itemType = itemType;
    }
    public String getChatDate()
    {
        return chatDate;
    }
    public void setChatDate(String chatDate)
    {
        this.chatDate = chatDate;
    }
    public String getItemIO()
    {
        return itemIO;
    }
    public void setItemIO(String itemIO)
    {
        this.itemIO = itemIO;
    }
    public String getAccount()
    {
        return account;
    }
    public void setAccount(String account)
    {
        this.account = account;
    }
    
}
